package com.exercise;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YJ
 * Date: 2023-11-16
 * Time: 17:42
 */
public class PrintList {
    public void printList(ListNode head) {
        while (head != null) {
            System.out.print(head.val + "-->");
            head = head.next;
        }
    }
}
